package biz

import (
	"database/sql"
	"github.com/google/wire"
	"gorm.io/gorm"
)

var TaskSet = wire.NewSet(NewTaskBiz)

type TaskCondition struct {
	TaskName string
	ID       uint
	Status   int32
}

type TaskUpdate struct {
	TaskName  string
	Image     string
	Env       string
	StartTime string
	EndTime   string
	Status    int32
}

type Task struct {
	ID        uint           `gorm:"primaryKey"`
	TaskName  string         `json:"task_name"`
	Image     string         `json:"image"`
	Env       string         `json:"env"`
	StartTime string         `json:"start_time"`
	EndTime   string         `json:"end_time"`
	Status    int32          `json:"status"`
	CreateAt  sql.NullTime   `json:"create_time"`
	UpdateAt  sql.NullTime   `json:"update_time"`
	DeleteAt  gorm.DeletedAt `gorm:"index"`
}
